<%--
  Created by IntelliJ IDEA.
  User: 57998
  Date: 2020/10/17
  Time: 16:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <meta charset="UTF-8">
    <script type="text/javascript" class="autoinsert" src="js/jquery-2.2.0.min.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="css/channel_base.css" />
	<link rel="stylesheet" type="text/css" href="css/classify_copy.css" />
	<script src="js/layer.js" type="text/javascript" charset="autoinsert"></script>
	<link rel="stylesheet" type="text/css" href="css/layer.css"/>
</head>
<body>
	
	<input type="hidden" id="login" value="${login}" />
	<script type="text/javascript">
		window.onload = function () {
			if($("#login").val() != "nologin"){
				$("#nologin").hide();
				$("#islogin").show();
			}else{
				$("#nologin").show();
				$("#islogin").hide();
			}
		}
	</script>
	<header class="header">
		<div style="display: flex;justify-content: space-evenly;align-items: center;">
			<a href="${pageContext.request.contextPath}/home" style="color: blueviolet;font-size: 20px;">首页</a>
			<ul class="nav-main">
				<li><a href="${pageContext.request.contextPath}/classify?type=0&updown=down_all" class="nav_link nav_link_1 t4">全部</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=喜剧&updown=down_all" class="nav_link nav_link_1 t4">喜剧</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=动作&updown=down_all" class="nav_link nav_link_1 t4">动作</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=爱情&updown=down_all" class="nav_link nav_link_1 t4">爱情</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=惊悚&updown=down_all" class="nav_link nav_link_1 t4">惊悚</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=悬疑&updown=down_all" class="nav_link nav_link_1 t4">悬疑</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=战争&updown=down_all" class="nav_link nav_link_1 t4">战争</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=科幻&updown=down_all" class="nav_link nav_link_1 t4">科幻</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=动画&updown=down_all" class="nav_link nav_link_1 t4">动画</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=武侠&updown=down_all" class="nav_link nav_link_1 t4">武侠</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=历史&updown=down_all" class="nav_link nav_link_1 t4">历史</a></li>
				<li><a href="${pageContext.request.contextPath}/classify?type=其他&updown=down_all" class="nav_link nav_link_1 t4">其他</a></li>
			</ul>
			<ul class="nav-right">
				<li class="nav-vip">
					<a href="#" onclick="to_mine()">个性推荐</a>
				</li>
				<li class="nav-login" id="nologin"><a href="#" onclick="to_login()"><span>登录</span></a></li>
				<li class="nav-login" hidden="hidden" id="islogin"><a href="${pageContext.request.contextPath}/mine"><span>${login}</span></a></li>
			</ul>
		</div>
	</header>
	<div class="banner">
		<div class="container">
			<h2>国内外电影资源快速搜索观看</h2>
			<p>智能筛选  个性推荐</p>
			<div class="search-form">
				<form method="post" class="site-search-form" action="${pageContext.request.contextPath}/search">
					<input class="search-input" name="keyword" type="text" placeholder="搜索一下">
					<button class="search-btn" type="submit">搜索</button>
				</form>
			</div>
		</div>
	</div>
	
	<script type="text/javascript">
		function to_login() {
			parent.layer.open({
		            type: 2,
		            skin: 'layui-layer-demo', //样式类名
		            area: ['30%', '60%'], //宽高
					offset:"15%",
		            shadeClose: true, //开启遮罩关闭
		            content: 'qiantai_login.jsp'
		    });
		}
		
		function to_mine() {
			if($("#login").val() != "nologin"){
				window.location.href="${pageContext.request.contextPath}/mine";
			}else{
				to_login();
			}
		}
		
		function update_fid1(fid1,url,vip_look) {
			if($("#login").val() != "nologin"){
				window.location.href="${pageContext.request.contextPath}/vedio?src="+url+"&fid="+fid1+"&vip_look="+vip_look;
			}else{
				parent.layer.msg('您尚未登录，将无法进行个性推荐!', {
					time: 1500,
					offset:"55%",
				});
				setTimeout(function (){
					window.location.href="${pageContext.request.contextPath}/vedio?src="+url+"&fid="+fid1+"&vip_look="+vip_look;
				}, 1700);
			}
		}
		
	</script>

</body>
</html>
